home *** CD-ROM | disk | FTP | other *** search
- var pNum = Number(this._name.slice(5,-3));
- var pX;
- var pY;
- var pMyPause;
- var pAnim;
- this.setPos = function(ty)
- {
- this._x = pX + 38;
- this._y = pY - ty;
- };
- this.setUp = function(x, y, rot, frames)
- {
- var _loc1_ = this;
- var _loc2_ = rot;
- _loc1_.pX = x * 16;
- _loc1_.pY = y * 16;
- _loc1_._rotation = 90 * _loc2_;
- if(_loc2_ == 1 || _loc2_ == 3)
- {
- _loc1_.pY += 10;
- }
- else if(_loc2_ == 2)
- {
- _loc1_.pY += 20;
- }
- pMyPause = frames * 24;
- _loc1_.pAnim = pMyPause;
- };
- switch(pNum)
- {
- case 0:
- this.setUp(8,7,1,4);
- break;
- case 1:
- this.setUp(34,23,3,5);
- break;
- case 2:
- this.setUp(22,53,3,4);
- break;
- case 3:
- this.setUp(8,76,1,5);
- break;
- case 4:
- this.setUp(18,92,3,4);
- }
- this.onEnterFrame = function()
- {
- var _loc1_ = this;
- pAnim--;
- if(pAnim <= 0)
- {
- pAnim = pMyPause;
- pState = "active";
- if(Math.distance(_loc1_,_loc1_._parent.bod_mc) < 300)
- {
- _loc1_._parent.snd_mc.playsound("pSteam");
- }
- _loc1_.gotoAndPlay(2);
- }
- };
- stop();
-